package com.eidos.blogs.openapi.entity.seckill;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;


/**
* @author ： Eidos
* @date ：Created in 2021-01-12
* @description：抢红包记录表 实体类
* @modified By：
* @version: 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("rede_receive_record")
@ApiModel(value="RedeReceiveRecord对象", description="领取红包记录表")
public class RedeReceiveRecord extends Model<RedeReceiveRecord> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "红包ID")
    @TableField("red_envelope_id")
    private Long redEnvelopeId;

    @ApiModelProperty(value = "抢到红包用户的用户标识")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "抢到红包的金额")
    @TableField("amount")
    private Long amount;

    @ApiModelProperty(value = "是否手气最佳：0-不是，1-是")
    @TableField("best")
    private Integer best;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
